home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / graphics / pov2doc.zip / PRIMITIV.POV < prev    next >
Text File  |  1993-07-11  |  3KB  |  156 lines

  1. // Persistence Of Vision Raytracer version 2.0 sample file.
  2.  
  3. #include "stage1.inc"
  4.  
  5. #declare Radius =2.5
  6. #declare RowSpace=1.1
  7. #declare ColSpace=1.1
  8. #declare Dist=-3
  9. #declare Row3= 2
  10. #declare Row2=Row3+Radius*RowSpace*2
  11. #declare Row1=Row2+Radius*RowSpace*2
  12. #declare Col1= -Radius*ColSpace*3
  13. #declare Col2= Col1+Radius*ColSpace*2
  14. #declare Col3= Col2+Radius*ColSpace*2
  15. #declare Col4= Col3+Radius*ColSpace*2
  16. #declare Col5= Col4+Radius*ColSpace*2
  17.  
  18. camera {Camera1 translate <0,Row2,-110>}
  19.  
  20. #declare Fade=
  21. texture {
  22.    pigment {
  23.       gradient <1,1,0>
  24.       color_map {
  25.          [0.0 color Green]
  26.          [0.3 color Green]
  27.          [0.5 color Clear]
  28.          [1.0 color Clear]
  29.       }
  30.       rotate z*45
  31.    }
  32.    finish {phong 1}
  33.    scale 5
  34. }
  35.  
  36. #declare Solid=
  37. texture {
  38.    pigment {Green}
  39.    finish {phong 1}
  40. }
  41.  
  42. bicubic_patch { 
  43.    type 1 flatness 0.01 u_steps 4 v_steps 4,
  44.    <0, -1.5, 2>, <1, -1.5, 0>, <2, -1.5, 0>, <3, -1.5, -2>,
  45.    <0, -0.5, 0>, <1, -0.5, 0>, <2, -0.5, 0>, <3, -0.5,  0>,
  46.    <0,  0.5, 0>, <1,  0.5, 0>, <2,  0.5, 0>, <3,  0.5,  0>,
  47.    <0,  1.5, 2>, <1,  1.5, 0>, <2,  1.5, 0>, <3,  1.5, -2>
  48.    texture {Solid}
  49.    rotate    -45*y
  50.    translate <Col1, Row1, Dist>
  51. }
  52.  
  53. blob {
  54.    threshold 0.6
  55.    component 1.0, 1.0, < 0.75,   0,       0>
  56.    component 1.0, 1.0, <-0.375,  0.64952, 0>
  57.    component 1.0, 1.0, <-0.375, -0.64952, 0>
  58.    texture {Solid}
  59.    translate <Col2, Row1, Dist>
  60. }
  61.  
  62. box {
  63.    <-1, -1, -1>, <1, 1, 1>
  64.    texture {Solid}
  65.    rotate <-25, 15, 0>
  66.    translate <Col3, Row1, Dist>
  67. }
  68.  
  69. cone {
  70.    x,0.5,
  71.    -x,1.0
  72.    rotate  y*30
  73.    texture {Solid}
  74.    translate <Col4, Row1, Dist>
  75. }
  76.  
  77. cylinder {
  78.    x,-x,1.0
  79.    rotate  y*30
  80.    texture {Solid}
  81.    translate <Col1, Row2, Dist>
  82. }
  83.  
  84. cubic { 
  85.    //         x*x                + y*y*y + y*y           + z*z  -1 =0
  86.    <0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0.45, 0, 1, 0, 0, 0, 0, 1, 0, -1>
  87.    sturm
  88.    texture {Fade}
  89.    clipped_by{object{UnitBox scale 2.5}}
  90.    bounded_by{clipped_by}
  91.    translate <Col2, Row2, Dist>
  92. }
  93.  
  94. disc {
  95.    <Col3, Row2, Dist>, //center location
  96.    <-1, 3, -2>,        //normal vector  
  97.    1.5,                //radius         
  98.    0.5                 //hole radius (optional)
  99.    texture {Solid}
  100. }
  101.  
  102.  
  103. height_field { 
  104.    gif "plasma3.gif" 
  105.    smooth
  106.    texture {Solid}
  107.    translate <-.5, -.5, -.5>
  108.    scale <4,2,4>
  109.    rotate <-35, -30, 0>
  110.    translate <Col4, Row2, Dist>
  111. }  
  112.  
  113. plane { z, 0
  114.    texture {Fade}
  115.    clipped_by{object{UnitBox scale 3}}
  116.    bounded_by{clipped_by}
  117.    translate <Col1, Row3, Dist>
  118. }  
  119.  
  120. //   x^4 - x^2 + y^2 + z^2 = 0
  121. poly { 4
  122.    < 1,   0,   0,   0,   0,   0,   0,   0,   0, -1,
  123.    0,   0,   0,   0,   0,   0,   0,   0,   0,  0,
  124.    0,   0,   0,   0,   0,   1,   0,   0,   0,  0,
  125.    0,   0,   1,   0,   0>
  126.    sturm
  127.    scale 2
  128.    texture {Solid}
  129.    translate <Col2, Row3, Dist>
  130. }
  131.  
  132. // y - x*x + z*z = 0 
  133. quadric {
  134.    <-1, 0, 1>, <0, 0, 0>, <0, 1, 0>, 0
  135.    texture {Fade}
  136.    clipped_by{object{UnitBox scale 2}}
  137.    bounded_by{clipped_by}
  138.    translate <Col3, Row3, Dist>
  139. }
  140.  
  141. quartic {
  142.    //xxxx         xxyy    xxzz  -2(rr+RR)xx
  143.    <1, 0, 0, 0, 2, 0, 0, 2, 0, -2.5,
  144.    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  145.  
  146.    //yyyy     yyzz  -2(rr-RR)yy
  147.    1, 0, 0, 2, 0    1.5,     0, 0, 0,  0,  
  148.  
  149.    //zzzz   -2(rr+RR)zz    (rr-RR)(rr-RR)
  150.    1, 0,    -2.5,       0, 0.5625>
  151.    texture {Solid}
  152.    rotate -45*x  
  153.    translate <Col4, Row3, Dist>
  154. }
  155.  
  156.